package com.lframework.xingyun.promo.vo.limitdiscount;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import com.lframework.starter.web.core.vo.BaseVo;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import com.lframework.starter.web.core.components.validation.TypeMismatch;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
public class CreateMarketingLimitdiscountVo implements BaseVo, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 促销活动名称
     */
    @ApiModelProperty(value = "促销活动名称", required = true)
    @NotBlank(message = "请输入促销活动名称！")
    @Length(message = "促销活动名称最多允许20个字符！")
    private String name;

    /**
     * 促销活动开始时间
     */
    @ApiModelProperty(value = "促销活动开始时间", required = true)
    @NotNull(message = "请输入促销活动开始时间！")
    @TypeMismatch(message = "促销活动开始时间格式有误！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginDate;

    /**
     * 促销活动结束时间
     */
    @ApiModelProperty(value = "促销活动结束时间", required = true)
    @NotNull(message = "请输入促销活动结束时间！")
    @TypeMismatch(message = "促销活动结束时间格式有误！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    /**
     * 活动期间是否周期执行
     */
    @ApiModelProperty(value = "活动期间是否周期执行", required = true)
    @NotNull(message = "请输入活动期间是否周期执行！")
    @TypeMismatch(message = "活动期间是否周期执行格式有误！")
    private Boolean cycleFlag;

    /**
     * 周期类型(1:每天; 2:每周; 3:每月)
     */
    @ApiModelProperty(value = "周期类型(1:每天; 2:每周; 3:每月)", required = true)
    @NotNull(message = "请输入周期类型(1:每天; 2:每周; 3:每月)！")
    @TypeMismatch(message = "周期类型(1:每天; 2:每周; 3:每月)格式有误！")
    private Integer cycleType;

    /**
     * 周期执行时间段
     */
    @ApiModelProperty(value = "周期执行时间段", required = true)
    @NotBlank(message = "请输入周期执行时间段！")
    @Length(message = "周期执行时间段最多允许4,294,967,295个字符！")
    private String cycleTimeGroup;

    /**
     * 周期执行规则
     */
    @ApiModelProperty(value = "周期执行规则", required = true)
    @NotBlank(message = "请输入周期执行规则！")
    @Length(message = "周期执行规则最多允许4,294,967,295个字符！")
    private String cycleTimeRule;

    /**
     * 促销折扣
     */
    @ApiModelProperty(value = "促销折扣", required = true)
    @NotBlank(message = "请输入促销折扣！")
    private String promDiscount;

    /**
     * 是否适应全部会员等级
     */
    @ApiModelProperty(value = "是否适应全部会员等级")
    private Integer allMemberLevel;

    /**
     * 会员等级id
     */
    @ApiModelProperty(value = "会员等级id", required = true)
    @NotBlank(message = "请输入会员等级id！")
    @Length(message = "会员等级id最多允许4,294,967,295个字符！")
    private String memberLevelId;

    /**
     * 是否限制购买数量
     */
    @ApiModelProperty(value = "是否限制购买数量", required = true)
    @NotNull(message = "请输入是否限制购买数量！")
    @TypeMismatch(message = "是否限制购买数量格式有误！")
    private Boolean allBuyLimit;

    /**
     * 周期限购数量
     */
    @ApiModelProperty(value = "周期限购数量", required = true)
    @NotNull(message = "请输入周期限购数量！")
    @TypeMismatch(message = "周期限购数量格式有误！")
    private Integer cycleBuyLimit;

    /**
     * 是否全部商品参与
     */
    @ApiModelProperty(value = "是否全部商品参与", required = true)
    @NotNull(message = "请输入是否全部商品参与！")
    @TypeMismatch(message = "是否全部商品参与格式有误！")
    private Boolean allProduct;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id", required = true)
    @NotBlank(message = "请输入商品id！")
    @Length(message = "商品id最多允许4,294,967,295个字符！")
    private String productId;

    /**
     * 是否可使用优惠券
     */
    @ApiModelProperty(value = "是否可使用优惠券", required = true)
    @NotNull(message = "请输入是否可使用优惠券！")
    @TypeMismatch(message = "是否可使用优惠券格式有误！")
    private Boolean useCoupon;

    /**
     * 是否可参与满减
     */
    @ApiModelProperty(value = "是否可参与满减", required = true)
    @NotNull(message = "请输入是否可参与满减！")
    @TypeMismatch(message = "是否可参与满减格式有误！")
    private Boolean useFullreduction;

    /**
     * 是否可参与特价
     */
    @ApiModelProperty(value = "是否可参与特价", required = true)
    @TypeMismatch(message = "是否可参与特价格式有误！")
    @NotNull(message = "请输入是否可参与特价！")
    private Boolean useFullprice;

    /**
     * 是否可参与满赠
     */
    @ApiModelProperty(value = "是否可参与满赠", required = true)
    @NotNull(message = "请输入是否可参与满赠！")
    @TypeMismatch(message = "是否可参与满赠格式有误！")
    private Boolean useFullgiftactivity;

    /**
     * 是否全部门店
     */
    @ApiModelProperty(value = "是否全部门店", required = true)
    @NotNull(message = "请输入是否全部门店！")
    @TypeMismatch(message = "是否全部门店格式有误！")
    private Boolean allShop;

    /**
     * 门店id
     */
    @ApiModelProperty(value = "门店id", required = true)
    @NotBlank(message = "请输入门店id！")
    private String shopId;

}

